<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>${SYSTEM_NAME}</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/layui/css/layui.css?v=${FILE_VERSION}" media="all">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/style/admin.css?v=${FILE_VERSION}" media="all">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/style/login.css?v=${FILE_VERSION}" media="all">
  <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/captcha/verify.css?v=${FILE_VERSION}" media="all">
    <style type="text/css">
        .nc-container .nc-lang-cnt{
            font-size: 16px !important;
        }
        .nc-container .nc_scale .nc_bg {
            background: #f5d532 !important;
        }
        .nc-container .nc_iconfont.btn_ok{
            color: #f5d532 !important;
        }

        .nc-container #nc_1_wrapper,.nc-container.tb-login #nc_1_wrapper{width:100%}
        .nc-container .imgCaptcha,.nc-container .clickCaptcha{width:298px;}
        .nc-container.tb-login .imgCaptcha,.nc-container.tb-login .clickCaptcha{width:300px;}
        .nc-container.tb-login .imgCaptcha .captcha-error,.nc-container.tb-login .clickCaptcha .captcha-error{width:292px;}
        .nc-container.tb-login .errloading, .nc-container .errloading {width:290px;}
        input:-webkit-autofill , textarea:-webkit-autofill, select:-webkit-autofill {
            -webkit-text-fill-color: #ededed !important;
            -webkit-box-shadow: 0 0 0px 1000px transparent  inset !important;
            background-color:transparent;
            background-image: none;
            transition: background-color 50000s ease-in-out 0s;
        }
        .layadmin-user-login-main{
            float: right;margin-right: 260px;background-color: rgba(0, 0, 0, 0.3);width: 390px;padding:26px;
        }
        .layadmin-user-login-icon{
            color:#930000;
            font-size: 26px;
        }
        .layadmin-user-login-box input{
            height: 50px;font-size: 20px;color:#fff;background-color: transparent !important;border: 1px solid #fff;
        }
        .layadmin-user-login-icon {
            line-height: 48px !important;
        }
        .sendSmsCodeButton{
            position: absolute;right: 0px;top:0px;padding: 0 10px;height:50px;line-height:50px;border: none;border-left: 1px solid #dbd7d7!important;color:#dbd7d7 !important;
        }
    </style>
</head>
<body style="background:url(${pageContext.request.contextPath}/static/images/login_bg.jpg) no-repeat right bottom;">
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">

  <div class="layadmin-user-login-main">

    <div class="layadmin-user-login-box layadmin-user-login-header">
        <div class="layui-row" style="color: #fff9ec;font-size: 26px">
            ${SYSTEM_NAME}
<%--            <img src="${pageContext.request.contextPath}/static/images/login_logo.png" style="width: 100%;">--%>
        </div>
    </div>
    <div id="errorMsg" style="margin-left: 20px;color: #ff521c;font-size: 16px">
    </div>
    <div class="layadmin-user-login-box layadmin-user-login-body layui-form" style="padding-top:10px;">
          <%--      用户名密码登录面板--%>
          <div class="layui-row loginPanel" id="userPwdPanel">
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
                  <input type="text" name="username" id="LAY-user-login-username" placeholder="用户名" class="layui-input">
              </div>
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
                  <input type="password" name="password" id="LAY-user-login-password"  placeholder="密码" class="layui-input">
              </div>
          </div>

          <%--      手机验证码登录面板--%>
          <div class="layui-row loginPanel" id="phoneCodePanel" style="display: none;">
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-cellphone" for="login-phone"></label>
                  <input type="text" name="username" id="login-phone" placeholder="手机号" class="layui-input">
              </div>
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-vercode" for="login-phoneVercode"></label>
                  <input type="password" name="password" id="login-phoneVercode"  placeholder="验证码" class="layui-input">
                  <button class="layui-btn layui-btn-primary layui-border-green sendSmsCodeButton" onclick="sendSmsCode(this)">发送验证码</button>
              </div>
          </div>
          <%--      忘记密码面板--%>
          <div class="layui-row loginPanel" id="forgotPwdPanel" style="display: none;">
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-cellphone" for="forgot-phone"></label>
                  <input type="text" name="username" id="forgot-phone" placeholder="手机号" class="layui-input">
              </div>
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-vercode" for="forgot-phoneVercode"></label>
                  <input type="password" name="password" id="forgot-phoneVercode"  placeholder="验证码" class="layui-input">
                  <button class="layui-btn layui-btn-primary layui-border-green sendSmsCodeButton" onclick="sendSmsCode(this,'forgotVercode')">发送验证码</button>
              </div>
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="forgot-newPwd"></label>
                  <input type="password" name="password" id="forgot-newPwd"  placeholder="请输入新密码" class="layui-input">
              </div>
              <div class="layui-form-item" style="margin-bottom: 30px;">
                  <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="forgot-repeatNewPwd"></label>
                  <input type="password" name="password" id="forgot-repeatNewPwd"  placeholder="请再次输入新密码" class="layui-input">
              </div>
          </div>
        <!--No-Captcha渲染的位置，其中 class 中必须包含 nc-container-->
        <%--<c:if test="${VC_CODE == 'true'}">
          <div class="layui-form-item">
              <div id="point-yz-id" class="nc-container layui-form-item layui-input-icon-group"></div>
          </div>
        </c:if>--%>
        <c:if test="${VC_CODE == 'true'}">
            <c:if test="${VC_CODE_TYPE == '1'}">
                <div class="layui-form-item vercodeBox">
                    <div class="layui-row">
                        <div class="layui-col-xs7">
                            <label class="layadmin-user-login-icon layui-icon layui-icon-vercode" style="line-height: 48px" for="LAY-user-login-vercode"></label>
                            <input type="text" maxlength="4" id="LAY-user-login-vercode" placeholder="图形验证码" class="layui-input">
                        </div>
                        <div class="layui-col-xs5">
                            <div style="margin-left: 10px;">
                                <img src="${pageContext.request.contextPath}/manage/kaptcha.jpg" class="layadmin-user-login-codeimg" id="verCode" onclick="changeValidateCode()">
                            </div>
                        </div>
                    </div>
                </div>
            </c:if>
            <c:if test="${VC_CODE_TYPE == '2'}">
                <div class="layui-form-item vercodeBox">
                    <div id="point-yz-id" class="nc-container layui-form-item layui-input-icon-group"></div>
                </div>
            </c:if>
            <c:if test="${VC_CODE_TYPE == '3'}">
                <div class="layui-form-item vercodeBox">
                    <input id="captchaVer" name="captchaVer" type="hidden">
                    <div id="captchaContent" class="nc-container layui-form-item layui-input-icon-group"></div>
                </div>
            </c:if>
        </c:if>
        <c:if test="${LOGIN_SMS_CODE_OPEN == '1' || LOGIN_FORGOT_PWD_OPEN=='1'}">
            <div class="layui-form-item">
                <c:if test="${LOGIN_SMS_CODE_OPEN == '1'}">
                    <a style="float:right;margin-left:20px;cursor: pointer;color: #009688;" data-openpanel="phoneCodePanel" onclick="changePanel(this,1)">短信验证码登录</a>
                </c:if>
                <c:if test="${LOGIN_FORGOT_PWD_OPEN=='1'}">
                    <a style="float:left;cursor: pointer;color: #009688;" data-openpanel="forgotPwdPanel" onclick="changePanel(this,2)">忘记密码？</a>
                </c:if>
            </div>
        </c:if>
      <div class="layui-form-item">
        <button class="layui-btn layui-btn-fluid" id="loginBut" lay-submit lay-filter="LAY-user-login-submit"
                style="background-color:#ad001c;font-size: 20px;height: 50px;
                margin-top: 10px">登 入</button>
      </div>
    </div>
  </div>

  <div class="layui-trans layadmin-user-login-footer">
    <!-- <p>© 2018 <a href="" target="_blank"></a></p> -->
  </div>
</div>
<input type="hidden" value="${VC_CODE_TYPE}" id="VC_CODE_TYPE">
<input type="hidden" value="${VC_CODE}" id="VC_CODE">
<input type="hidden" value="${pwdStrength}" id="pwdStrength">

<script src="${pageContext.request.contextPath}/static/js/jquery-3.3.1.min.js?v=${FILE_VERSION}"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/crypto-js/crypto-js.js?v=${FILE_VERSION}"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/crypto-js/md5.js?v=${FILE_VERSION}"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/captcha/verify.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/js/common-2.0.0.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/js/userCheck/user-check.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/layuiadmin/layui/layui.js?v=${FILE_VERSION}"></script>
<script>
    var ua = window.navigator.userAgent.toLowerCase();
    /**
     * 此处根据不同终端来加载不同js，没用直接修改页面元素样式主要是因为修改不了，只在当前<style>里修改有效，js里在判断修改就不行
     **/
    if (ua.indexOf("iphone") > 0 || ua.indexOf("android") > 0) {
        $("body").append('<script src="${pageContext.request.contextPath}/static/js/vcCode/pointYz_mobile.js?v=${FILE_VERSION}"><\/script>');
    }else{
        $(".layadmin-user-login-main").addClass("pc_layadmin-user-login-main");
        $("body").append('<script src="${pageContext.request.contextPath}/static/js/vcCode/pointYz2.js?v=${FILE_VERSION}"><\/script>');
    }
</script>
<script src="${pageContext.request.contextPath}/static/js/common/login.js?v=${FILE_VERSION}"></script>
</body>
</html>